package com.xo.xodemo.mapper.db1;

import com.xo.xodemo.model.LeaveModel;
import com.xo.xodemo.model.ProcessEntity;
import com.xo.xodemo.model.ReturnUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface ProcessListMapper {
    int  insert(@Param("processEntity") ProcessEntity processEntity);
    List<ProcessEntity> selectmy(@Param("applyName") String applyName);
    ProcessEntity selectById(@Param("id") String id);
    List<ProcessEntity> selectUnFinishedForMe(@Param("username") String username,@Param("applyRealName") String applyRealName,@Param("applyTimeStart") String applyTimeStart,@Param("applyTimeEnd") String applyTimeEnd,
                                              @Param("name")String name,@Param("telephone")String telephone,@Param("paymentMethod")String paymentMethod,@Param("transferDateStart")String transferDateStart,
                                              @Param("transferDateEnd")String transferDateEnd,@Param("processType")String processType);
    List<ProcessEntity> selectFinishedForMe(@Param("username") String username,@Param("applyRealName") String applyRealName,@Param("applyTimeStart") String applyTimeStart,@Param("applyTimeEnd") String applyTimeEnd,
                                            @Param("name")String name,@Param("telephone")String telephone,@Param("paymentMethod")String paymentMethod,@Param("transferDateStart")String transferDateStart,
                                            @Param("transferDateEnd")String transferDateEnd,@Param("processType")String processType);
    List<ProcessEntity> selectCopyForMe(@Param("username") String username,@Param("applyRealName") String applyRealName,@Param("applyTimeStart") String applyTimeStart,@Param("applyTimeEnd") String applyTimeEnd,
                                        @Param("name")String name,@Param("telephone")String telephone,@Param("paymentMethod")String paymentMethod,@Param("transferDateStart")String transferDateStart,
                                        @Param("transferDateEnd")String transferDateEnd,@Param("processType")String processType);
    //修改是否已读
    int updateIsRead(@Param("isRead") Integer isRead,@Param("id") String id);
    //通过id查询审核状态
    Integer selectAuditerStatusById(@Param("id")String id);
    int auditingtrue(@Param("id") String id);

    int auditingfalse(@Param("applyRealName") String applyRealName,@Param("id") String id, @Param("endTime") Date endTime, @Param("duration") Long duration,@Param("rejectReason") String rejectReason,@Param("lastAuditingTime") Date lastAuditingTime,@Param("completeReview") String completeReview);

    int Completed(@Param("id") String id, @Param("endTime") Date endTime, @Param("duration") Long duration,@Param("lastAuditingTime") Date lastAuditingTime);
    int updateAuditingPersonAndRealName(@Param("auditingPerson") String auditingPerson,@Param("auditingPersonRealName") String auditingPersonRealName,@Param("id") String id,@Param("lastAuditingTime") Date date);
    int delete(@Param("id") String id);
    int addPersonAndRealName(@Param("auditingPerson") String auditingPerson,@Param("auditingPersonRealName") String auditingPersonRealName,@Param("id") String id,@Param("paymentWay") String paymentWay);
    int updateaddPersonAndRealName(@Param("auditingPerson") String auditingPerson,@Param("auditingPersonRealName") String auditingPersonRealName,@Param("id") String id,@Param("paymentWay") String paymentWay);
    int updateModifyingDocuments(@Param("auditingPerson") String auditingPerson,@Param("auditingPersonRealName") String auditingPersonRealName,@Param("id") String id,@Param("paymentWay") String paymentWay);

    int upsertCopy(@Param("copyPersons") List<String> copypersons, @Param("id") String id);
    List<String> getCopyPerson( @Param("id") String id);
}
